
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html" /> <!-- 引入样式 -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>专家管理</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<body class="fixed hold-transition skin-blue">

	<div class="wrapper">
		<!-- 引入表头 -->
		<div th:replace="tophtml::html"></div>
		<!-- 引入左边 -->
		<div th:replace="left::html"></div>

		<!-- 右侧表格部分 -->
		<div class="content-wrapper">
			<!--  -->
			<section class="content-header">
				<h1>专家管理<small></small></h1>
				<ol class="breadcrumb">
					<li><a href="/index"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a href="/person/findPersonList">专家管理</a></li>
				</ol>
			</section>
			<section class="content container-fluid">
				<!-- 右侧表单部分 -->
				<form id="from1" class="form-inline" th:action="@{/person/findPersonList}" method="get">
					<input type="hidden" name="pageNo" id="pageNo" th:value="${pageInfo.pageNum}"/>
					<div class="form-group">
						<label>专家类型</label> 
						<select name="type" th:field="${person.type}" class="form-control" style="width: 202px;">
							<option th:value=null>-请选择-</option>
							<option th:each="psd : ${personTypeList}" th:value="${psd.pid}" th:text="${psd.worth}"></option>
						</select>
					</div><br/>
					<div class="form-group">
                        <label>所属领域</label>
                        <span th:each="rfd : ${researchFieldDictiontryList}">
                            <label style="font-weight: lighter;">
                            	<input type="checkbox" name="researchField" th:value="${rfd.names}" th:text="${rfd.worth}" th:checked="${researchFieldArr != null ? #arrays.contains(researchFieldArr, rfd.names) : false}">
                            </label>
                        </span>
                        <span style="margin-left: 10px; color: red;">(可以多选)</span>
                    </div>
					<div class="form-group">
                        <label>人才级别</label>
                        <span th:each="rfd : ${talentLevelListByDic}">
                        	<label style="font-weight: lighter;">
                            	<input type="checkbox" name="talentLevel" th:value="${rfd.names}" th:text="${rfd.worth}" th:checked="${talentLevelArr != null ? #arrays.contains(talentLevelArr, rfd.names) : false}">
                            </label>	
                        </span>
                        <span style="margin-left: 10px; color: red;">(可以多选)</span>
                    </div><br/>
					<div class="form-group">
						<label style="margin-left: 14.8px;">专家ID</label> 
						<input type="text" class="form-control" th:if="${person.expertNumber==null}" name="expertNumberId" th:value="${person.expertNumber}" style="width: 202px;"> 
						<input type="text" class="form-control" th:if="${person.expertNumber!=null}" name="expertNumberId" th:value="'E'+${person.expertNumber}" style="width: 202px;">
					</div>
					<div class="form-group">
						<label style="margin-left: 28.2px;">姓名</label> 
						<input name="name" type="text" th:value="${person.name}" class="form-control" style="width: 202px;"/>
					</div>
					<div class="form-group">
						<label style="margin-left: 27.8px;">单位</label> 
						<input name="unit" type="text" th:value="${person.unit}" class="form-control" style="width: 202px;"/>
					</div><br/>
					<div class="form-group">
						<label style="margin-left: 28px;">邮箱</label> 
						<input name="email" type="text" th:value="${person.email}" class="form-control" style="width: 202px;"/>
					</div>
					<div class="form-group">
						<label style="margin-left: 28.3px;">手机</label> 
						<input name="tell" type="text" th:value="${person.tell}" class="form-control" style="width: 202px;"/>
					</div>
					<div class="form-group">
						<label>专业领域</label> 
						<input name="professionaField" type="text" th:value="${person.professionaField}" class="form-control" style="width: 202px;"/>
					</div>
					<!-- 搜索按钮 -->
					<button type="submit" class="btn btn-primary" style="margin-left: 40px;">搜索</button>
					<!-- 重置按钮 -->
					<button type="reset" style="margin-left: 40px;" class="btn btn-primary">重置</button>
					<!-- 添加按钮 -->
					<button type="button" class="btn btn-primary" onclick="javascript:window.location.href='/person/addView'" style="margin-left: 40px;">添加</button>
					<br/>
					<div>
                        <span class="from-group">
	                        <label>所在地区</label>
	                        <label style="font-weight: lighter;">
	                        	<input type="radio" name="domesticOrForeign" id="optionsRadios1" value="0" th:checked="${person != null ? person.domesticOrForeign == 0 : false}" style="margin-left: 1px;"> 国内
	                        </label>
	                        <label style="font-weight: lighter;">
	                        	<input type="radio" name="domesticOrForeign" id="optionsRadios2" value="1" th:checked="${person != null ? person.domesticOrForeign == 1 : false}" style="margin-left: 15px;"> 国外
	                        </label>
                        </span>
                        <span class="form-group form-country">
                        	<label style="margin-left: 124px;">国家</label>
	                        <select class="form-area" style="width: 202px;height: 35px;border-color: silver;">
	                            <option value="-1">--选择国家--</option>
	                            <option th:each="list:${countryDictiontryList}" th:value="${list.pid}" th:text="${list.worth}" th:selected="${list.pid eq country}"></option>
	                        </select>
                        </span><br/>
                        <span class="form-group form-area">
                        	<label style="margin-left: 42px;">省</label>	
	                        <select class="form-area" id="provinceId" style="width: 202px;height: 35px;border-color: silver;">
	                            <option value="-1">--选择省--</option>
	                            <option th:each="list:${provinceDictiontryList}" th:value="${list.names}" th:text="${list.worth}" th:selected="${list.names eq province}"></option>
	                        </select>
                        </span>
                        <span class="form-group form-area">
                        	<label style="margin-left: 43px;">市</label>
	                        <select class="form-area" id="cityId" style="width: 202px;height: 35px;border-color: silver;">
	                            <option value="-1">--选择市--</option>
	                            <option th:each="list:${cityDictiontryList}" th:value="${list.names}" th:text="${list.worth}" th:selected="${list.names eq city}"></option>
	                        </select>
                        </span>
                        <span class="form-group form-area">
                        	<label style="margin-left: 42px;">区</label>
	                        <select class="form-area" id="areaId" style="width: 202px;height: 35px;border-color: silver;">
	                            <option value="-1">--选择区--</option>
	                            <option th:each="list:${areaDictiontryList}" th:value="${list.names}" th:text="${list.worth}" th:selected="${list.names eq district}"></option>
	                        </select>
                        </span>
                    </div>
				</form>
				<!-- <form th:action="@{/person/importPerson}" method="post"  enctype="multipart/form-data">
                    <table>
                        <tr>
                            <td>
                                <input type="file" name="file">
                            </td>
                            <td>
                                <button type="submit" class="btn btn-primary">导入</button>
                            </td>
                        </tr>
                    </table>
                </form> -->
				<!-- 右侧列表部分 -->
				<div class="box">
					<div class="box-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<th>专家ID</th>
									<th>姓名</th>
									<th>专业领域</th>
									<th>操作</th>
								</tr>
								<tr th:each="person, stat : ${pageInfo.list}">
		                            <td title="查看专家详情">
		                            	<a th:href="@{/person/personDetails(pid=${person.pid})}" th:text="${'E'+person.expertNumber}"></a>
		                            </td>
		                            <td th:text="${person.name}"></td>
		                            <td width="25%">
										<div class="col-md-3" style="width:100%;font-size: 14px;">
									    	<div class="box box-default collapsed-box" style="border-top:0px solid #d2d6de;">
										    	<div class="box-header with-border" th:if="${person.professionaField != null}">
											    	<span th:if="${#strings.length(person.professionaField)>17}">
											        	<span th:text="${#strings.substring(person.professionaField,0,17)+'...'}"></span>
											        </span>
											        <span th:unless="${#strings.length(person.professionaField)>17}">
											        	<span th:text="${person.professionaField}"></span>
											        </span>
											        <div class="box-tools pull-right" th:if="${#strings.length(person.professionaField)>17}">
											        	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
											        </div>
										       	</div>
										        <div class="box-body" style="display: none;">
										            <span th:text="${person.professionaField}"></span>
										        </div>
									    	</div>
								        </div>
                					</td>
		                            <td>
		                            	<a th:href="@{/person/updateView(pid=${person.pid})}">修改</a>|
		                            	<a th:href="@{/person/mateConference(pid=${person.pid})}">参会</a>|
		                            	<a href="javascirpt:void(0)" th:onclick="'javascript:subscribe(\''+${person.pid}+'\',4)'">关注</a><br/>
		                            	<a th:href="@{'/person/mateDemandView?pid='+${person.pid}+
		                            				'&expertNumber='+${person.expertNumber}+
		                            				'&name='+${person.name}}">匹配需求
		                            	</a>|
		                            	<a th:href="@{/person/findButtDetailsList(pid=${person.pid})}">匹配需求详情</a>
		                            	<!-- <a th:href="@{/person/personDetails(pid=${person.pid})}">专家详情</a>| -->
		                            </td>
		                        </tr>
							</tbody>
						</table>
					</div>
					<!-- 页脚、分页 -->
					<div th:replace="page::html"></div>	
				</div>	
			</section>
		</div><!-- 右侧部分结束 -->
		
		<!-- 引入页脚 -->
		<div th:replace="footer::html"></div>
		<div class="control-sidebar-bg"></div> 
	</div>
	
	<!-- 引入js -->
	<div th:replace="bottom::html" ></div>
</body>
</html>